package com.eduadmin.service;

import com.eduadmin.entity.Team;
import com.eduadmin.mapper.TeamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamServiceImpl implements ITeamService {

    private final TeamMapper teamMapper;

    @Autowired
    public TeamServiceImpl(TeamMapper teamMapper) {
        this.teamMapper = teamMapper;
    }

    @Override
    public void addTeams(List<Team> teams) {
        teamMapper.insertTeams(teams);
    }

    //hgm
    @Override
    public Team getTeamByTeamName(String teamName) {
        return teamMapper.selectTeamByTeamName(teamName);
    }
    //hgm
    @Override
    public List<Team> getTeams() {
        return teamMapper.selectTeams();
    }

    // zlc
//    @Override
//    public List<Team> getTeamByParam(String gradeName) {
//        return teamMapper.getTeamByParam(gradeName);
//    }
}
